<?php
/**
 * @author Nguyễn Sơn Tùng <sontung.x305@gmail.com> <Y!M: terminator_nst> <Skype : joker.x305>
 * @version: 1.0
 * @copyright fteam.vn
 * Date: 09/01/2013
 * Time: 23:14
 */
class generalSettingForm extends CFormModel {

        public $site_name;
        public $site_offline;
        public $site_offline_message;
        public $site_offline_custom_message;
        public $site_default_editor;
        public $site_page_size;

        public $site_mainTitle;
        public $site_mainKeyWord;
        public $site_mainDescription;
        public $site_generator;
        public $site_robots;

        public $logo;
        public $no_image_available;
        public $icon;

        public $image_avatar_small_width;
        public $image_avatar_small_height;
        public $image_avatar_medium_width;
        public $image_avatar_medium_height;
        public $image_avatar_large_width;
        public $image_avatar_large_height;

        public $image_thumbnail_small_width;
        public $image_thumbnail_small_height;
        public $image_thumbnail_medium_width;
        public $image_thumbnail_medium_height;
        public $image_thumbnail_large_width;
        public $image_thumbnail_large_height;

        public $image_crop;
        public $image_watermark;
        public $image_watermark_text;
        public $image_watermark_image;

       // public $image_small_height;

    public function rules()
    {
        return array(
            // username and password are required
            array('site_name', 'required'),
            array('
            image_avatar_small_width,
            image_avatar_small_height,
            image_avatar_medium_width,
            image_avatar_medium_height,
            image_avatar_large_width,
            image_avatar_large_height,
            image_thumbnail_small_width,
            image_thumbnail_small_height,
            image_thumbnail_medium_width,
            image_thumbnail_medium_height,
            image_thumbnail_large_width,
            image_thumbnail_large_height,
            site_page_size',
                'numerical','integerOnly'=>true),
            array('no_image_available, image_watermark_image ,image_watermark_text, image_watermark, image_crop, site_offline, site_offline_message, site_offline_message, site_offline_custom_message, site_default_editor, site_page_size, site_mainTitle, site_mainKeyWord, site_mainDescription, site_generator, site_robots, logo, icon','safe'),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels()
    {
        return array(
            'site_name'=>t('Name','generalSettingForm'),
            'site_offline'=>t('Site Offline','generalSettingForm'),
            'site_offline_message'=>t('Offline Message','generalSettingForm'),
            'site_offline_custom_message'=>t('Custom Message','generalSettingForm'),
            'site_default_editor'=>t('Default Editor','generalSettingForm'),
            'site_page_size'=>t('Default List Limit','generalSettingForm'),

            'site_mainTitle'=>t('Default Title','generalSettingForm'),
            'site_mainKeyWord'=>t('Default KeyWord','generalSettingForm'),
            'site_mainDescription'=>t('Default Description','generalSettingForm'),
            'site_generator'=>t('Generator','generalSettingForm'),
            'site_robots'=>t('Robots','generalSettingForm'),

            'logo'=>t('Logo','generalSettingForm'),
            'no_image_available'=>t('No Image Available','generalSettingForm'),
            'icon'=>t('Icon','generalSettingForm'),

            'image_avatar_small_width'=>t('Small avatar width','generalSettingForm'),
            'image_avatar_small_height'=>t('Small avatar height','generalSettingForm'),
            'image_avatar_medium_width'=>t('Medium avatar width','generalSettingForm'),
            'image_avatar_medium_height'=>t('Logo','generalSettingForm'),
            'image_avatar_large_width'=>t('Large avatar width','generalSettingForm'),
            'image_avatar_large_height'=>t('Large avatar height','generalSettingForm'),

            'image_thumbnail_small_width'=>t('Small thumbnail width','generalSettingForm'),
            'image_thumbnail_small_height'=>t('Small thumbnail height','generalSettingForm'),
            'image_thumbnail_medium_width'=>t('Medium thumbnail width','generalSettingForm'),
            'image_thumbnail_medium_height'=>t('Medium thumbnail height','generalSettingForm'),
            'image_thumbnail_large_width'=>t('Large thumbnail width','generalSettingForm'),
            'image_thumbnail_large_height'=>t('Large thumbnail height','generalSettingForm'),

            'image_crop'=>t('Crop','generalSettingForm'),
            'image_watermark'=>t('Watermark','generalSettingForm'),
            'image_watermark_text'=>t('Watermark Text','generalSettingForm'),
            'image_watermark_image'=>t('Watermark Image','generalSettingForm'),
        );
    }
}